
import request from '@/utils/request'



// 根据身份证查询学生信息
export function queryStudentByCard(idCard) {
  return request({
    url: '/app-api/system/student/profile/queryStudentByCard?idCard=' + idCard,
    method: 'get'
  })
}

// 获取首页banner
export function getBannerPage(data) {
  return request({
    url: '/app-api/system/banner/page',
    method: 'get',
		data:data
  })
}

// 获取首页banner
export function getAdminBanner(data) {
  return request({
    url: '/admin-api/system/banner/page',
    method: 'get',
		data:data
  })
}

// 分页获取角色列表
export function getRoleList(data) {
  return request({
    url: '/admin-api/system/role/page',
    method: 'get',
	data:data
  })
}

// 根据id获取角色详情
export function getRoleById(data) {
  return request({
    url: '/admin-api/system/role/get',
    method: 'get',
	data:data
  })
}

// 获取机构列表
export function getDeptList() {
  return request({
    url: '/admin-api/system/dept/list',
    method: 'get',
  })
}

// 获取Id获取机构
export function getDeptById(data) {
  return request({
    url: '/admin-api/system/dept/get',
    method: 'get',
		data:data
  })
}


//新增机构
export function createDept(data) {
  return request({
    url: '/admin-api/system/dept/create',
    method: 'post',
		data:data
  })
}


//机构修改
export function updateDept(data) {
  return request({
    url: '/admin-api/system/dept/update',
    method: 'put',
		data:data
  })
}

//机构删除
export function delDept(id) {
  return request({
    url: '/admin-api/system/dept/delete?id=' + id,
    method: 'delete',
  })
}

// 获取用户
export function getUserSimple() {
  return request({
    url: '/admin-api/system/user/list-all-simple',
    method: 'get',
  })
}

// 获取用户
export function getDeptSimple() {
  return request({
    url: '/admin-api/system/dept/list-all-simple',
    method: 'get',
  })
}

// 获取菜单
export function getMenuSimple() {
  return request({
    url: '/admin-api/system/menu/list-all-simple',
    method: 'get',
  })
}
export function getMenuData(data){
	return request({
		url: '/admin-api/system/permission/list-role-resources',
		method: 'get',
		data:data
	})
}

//给角色配置菜单权限
export function assignRoleMenu(data) {
  return request({
    url: '/admin-api/system/permission/assign-role-menu',
    method: 'post',
		data:data
  })
}

